home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Prog / B-C / CTherm.cpt / CObject(ThermDemo).p < prev    next >
Encoding:
Text File  |  1990-08-20  |  1.1 KB  |  52 lines  |  [TEXT/PJMM]

  1. {****************************************************}
  2. {         CObject.p}
  3. {}
  4. {        Interface for the Object Class}
  5. {}
  6. {        Abstract class which is at the root of the class hierarchy. CObject }
  7. {        is the only class which does not have a superclass.  }
  8. {}
  9. {            SUPERCLASS = None }
  10. {}
  11. {        Copyright © 1989, Symantec Corporation.  All rights reserved.            }
  12. {}
  13. {****************************************************}
  14.  
  15. unit CObject;
  16.  
  17. interface
  18.  
  19.     uses
  20.         MiniIntf;
  21.  
  22. implementation
  23.  
  24.  
  25. {****************************************************}
  26. { Free }
  27. {}
  28. {        Dispose of an object by freeing the block of memory it occupies. }
  29. {}
  30. {****************************************************}
  31.     procedure CObject.Free;
  32.     begin
  33.         DisposHandle(Handle(SELF));
  34.     end;
  35.  
  36.  
  37. {****************************************************}
  38. { Clone }
  39. {}
  40. {        Make a copy of an object}
  41. {}
  42. {****************************************************}
  43.     function CObject.Clone: CObject;
  44.         var
  45.             copyOfObject: Handle;
  46.             temp: OSErr;
  47.     begin
  48.         copyOfObject := Handle(SELF);
  49.         temp := HandToHand(copyOfObject);
  50.         Clone := CObject(copyOfObject);
  51.     end;
  52. end.